package cn.yanhu.kuwanapp.http

import cn.yanhu.kuwanapp.utils.Config

object UrlConstainer {

    var appBaseUrl = ""    //接口地址

    private var TYPE_ENVIROMENT_DEV = "dev" //开发环境
    private var TYPE_ENVIROMENT_PROD = "prod" //生产环境

    //环境切换时这里需要进行修改
    var SHOW_LOG = true //是否显示日志(默认为true)
    var canProxy = false //是否允许代理(默认为true)
    var type_enviroment = TYPE_ENVIROMENT_PROD //(环境，默认为TYPE_ENVIROMENT_DEV)

    fun getServerAddress() {
        when (type_enviroment) {
            TYPE_ENVIROMENT_DEV -> {
                appBaseUrl = Config.DEV_API_URL
            }
            TYPE_ENVIROMENT_PROD -> {
                appBaseUrl = Config.PROD_API_URL
            }
        }
    }

}